package net.vanchu.mortgagecalculator;

import android.app.Application;

import com.dtspread.apps.houseloan.R;
import com.dtspread.libs.bitmaploader.BitmapLoader;
import com.dtspread.libs.config.ServerSetting;
import com.dtspread.libs.push.PushClient;
import com.dtspread.libs.share.cfg.PlatformCfg;
import com.umeng.analytics.MobclickAgent;

import net.vanchu.mortgagecalculator.common.config.OptionsProvider;
import net.vanchu.mortgagecalculator.common.config.TestConfigProvider;
import net.vanchu.mortgagecalculator.mortgage.calculate.MainActivity;

/**
 * Created by Granton on 2016/12/19.
 */
public class MortgageCalculatorApp extends Application {

    private static MortgageCalculatorApp app;

    public static MortgageCalculatorApp get() {
        return app;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        app = this;
        ServerSetting.setup(ServerSetting.TEST_ENV, ServerSetting.HOST, String.valueOf(1004));
        OptionsProvider.init(new TestConfigProvider());
        BitmapLoader.init(getApplicationContext(), false);
        PushClient.init(getApplicationContext(), MainActivity.class, R.mipmap.ic_launcher);
        PlatformCfg.setPlatformIds(getString(R.string.wx_app_id), getString(R.string.tencent_app_id));
        MobclickAgent.setDebugMode(false);
    }
}